//
//  OrderAddAPI.m
//  StarOrangeStaff
//
//  Created by lshenrong on 2020/7/19.
//  Copyright © 2020 lshenrong. All rights reserved.
//

#import "OrderAddAPI.h"

@interface  OrderAddAPI()

@property (nonatomic,copy) NSString *seriesId;
@property (nonatomic,copy) NSString *custId;

@property (nonatomic,copy) NSString *orderWay;

@property (nonatomic,assign) NSInteger useWay;
@property (nonatomic,copy) NSString *startDate;
@property (nonatomic,copy) NSString *preEndDate;
@property (nonatomic,copy) NSString *carCount;
@property (nonatomic,copy) NSString *booker;
@property (nonatomic,copy) NSString *bookerTel;


@property (nonatomic,copy) NSString *provCode;
@property (nonatomic,copy) NSString *cityCode;

@property (nonatomic,copy) NSString *addrType;
@property (nonatomic,copy) NSString *rider;
@property (nonatomic,copy) NSString *riderTel;

@end

@implementation OrderAddAPI

- (instancetype)initWithUserSeriesId:(NSString *)seriesId {
    if (self = [super init]) {
        self.seriesId = seriesId ;
        [self testDataAPI];
       
    }
    return self;
}

- (void)testDataAPI {
    self.orderWay = @"2";
    self.seriesId = @"1";
    self.custId = @"1";
    self.useWay = 1;
    self.startDate = @"2020-05-10 10:30";
    self.preEndDate = @"2020-05-11 18:30";
    self.provCode = @"1";
    self.cityCode = @"11";
    self.rider = @"1";
    self.addrType = @"1";
    self.carCount = @"2";
    self.booker = @"lsr";
    self.bookerTel = @"18520701023";

}

- (NSString *)requestUrl {
    return @"message/order/addOrder";
}



- (id)requestAppendArgument{

    
     return @{
                @"orderWay":@"2",
                @"custId":self.custId,
                @"useWay":@(self.useWay),
                @"seriesId":self.seriesId,
                @"startDate":self.startDate,
                @"preEndDate":self.preEndDate,
                @"carCount":self.carCount,
                @"booker":self.booker,
                @"bookerTel":self.bookerTel,
                @"orderAddressList":@[
                                     @{
                                        @"provCode":@"1",
                                        @"cityCode":@"11",
                                        @"areaCode":@"111",
                                        @"addrDetail":@"广州市白云区白云大道",
                                        @"addrType":self.addrType,
                                        },
                                     @{
                                        @"provCode":@"1",
                                        @"cityCode":@"11",
                                        @"areaCode":@"111",
                                        @"addrDetail":@"广州市白云区白云大道",
                                        @"addrType":self.addrType,
                                        }
                ],
                @"orderRidersList":@[
                                    @{
                                        @"rider":@"zhangsan",
                                        @"riderTel":@"1212323131"
                                    },
                                    @{
                                        @"rider":@"lisi",
                                        @"riderTel":@"1313222323"
                                     }
                ]
             };
}

@end
